<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn">
<%@ include file="/WEB-INF/view-system/include/contentTaglib.jsp"%>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<script src="${ctx}/static-system/js/orgManage/orgManage.js" type="text/javascript"></script>
    <link href="${ctx}/static-system/css/orgManage/orgManage.css" rel="stylesheet" type="text/css"/>
	<title>部门管理</title>
</head>
<body>
	<tags:ajax id="commitChangesAjax" url="${ctx }/org/change" type="post"
		contentType="application/x-www-form-urlencoded"
		onBeforeSend="opreate.saveBefore" onComplete="opreate.saveComplete" 
		onSuccess="opreate.success" onError="opreate.error"/>
	<tags:ajax id="queryOrgsAjax" url="${ctx}/sys/orgMgr/queryAllOrg" type="post"
	onBeforeSend="showTr.showloading" onComplete="showTr.closeloading"/>
	<tags:boards>
		<tags:board width="40%" boardTitle="部门树">
			<div class="opreate" style="display: none">
				<span title="新增">
					<a href="javascript:;" onclick="opreate.add()">
						<i class="icon icon-plus"></i>
					</a>
				</span>
				<!-- 
				<span title="编辑"><a href="javascript:;"><i class="icon icon-pencil"></i></a></span>
				 -->
				<span title="删除">
					<a href="javascript:;" onclick="opreate.delNode()">
						<i class="icon icon-minus"></i>
					</a>
				</span>
				<span title="保存">
					<a href="javascript:;" onclick="opreate.save()">
						<i class="icon icon-save"></i>
					</a>
				</span>
				<span title="刷新">
					<a href="javascript:;" onclick="opreate.fresh()">
						<i class="icon icon-repeat"></i>
					</a>
				</span>
			</div>
			<div id="showTree" class="showTree">
				<div id="orgloading" class="orgloading" style="display:none">
					<i class="icon icon-spin icon-spinner-indicator icon-3x"></i>
				</div>
				<tags:tree ajax="queryOrgsAjax" id="orgsTree" showLine="true"
				nodeNameKey="orgName" nodeId="orgId" parentId="parOrgId" 
				nodeChildrenKey="children" nodeTitleKey="orgName"
				onCurrentNodeSelected="tree.nodeClick"/>
			</div>
			<!-- <div id="orgloading" class="orgloading" style="display:none">
				<i class="icon icon-spin icon-spinner-indicator icon-3x"></i>
			</div> -->
		</tags:board>
		<tags:board width="60%" boardTitle="机构明细">
			<form action="" id="nodesDetailFrm">
				<table>
					<tr>
						<td><label>机构名称：</label></td>
						<td colspan="2">
							<input type="text" class="form-control" name="orgName" onblur="inputOper.onblurFunc()">
						</td>
					</tr>
					<tr>
						<td><label>状态：</label></td>
						<td colspan="2">
							<select class="form-control chosen-select" name="state">
								<option value="1" selected="selected">正常</option>
								<option value="0">禁用</option>
							</select>
						</td>
					</tr>
				</table>
			</form>
		</tags:board>
	</tags:boards>
</body>
</html>